﻿<?xml version="1.0" encoding="utf-8"?>

<!--
  business ids mapping
-->

<Mapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Entity type="NUnit:Mapping:IdGuid:Person" table="Person">
    <Id field="personId">
      <Generator name="guid"/>
    </Id>

    <Attribute name="Name" field="name" db-type="String" size="50" not-null="false" />
    <Attribute name="Age" field="age" db-type="Int32" not-null="false" />

    <Reference name="Vehicules" entityChild="NUnit:Mapping:IdGuid:Vehicule">
      <Rule parentField="personId" childTable="Vehicule" childField="FK_Person" />
    </Reference>
    
  </Entity>

  <Entity type="NUnit:Mapping:IdGuid:Vehicule" table="Vehicule">
    <Id field="vehiculeId">
      <Generator name="guid"/>
    </Id>

    <Attribute name="Model" field="model" db-type="String" size="50" not-null="false" />

  </Entity>
  
</Mapping>